#import "AllinBase64Util.h"
@interface AllinBase64Util ()
@end

@implementation AllinBase64Util
+ (NSString*) encode:(NSData*)data{
    data = [data base64EncodedDataWithOptions:0];
    NSString *ret = [[NSString alloc] initWithData:data encoding:NSUTF8StringEncoding];
    return ret;
}

+ (NSData*) decode:(NSString*)str{
    NSData *data = [[NSData alloc] initWithBase64EncodedString:str options:NSDataBase64DecodingIgnoreUnknownCharacters];
    return data;
}

@end
